import request from '@/utils/request'

// 查询请假列表
export function leaveList(query) {
  return request({
    url: '/system/leave/list',
    method: 'get',
    params: query
  })
}

// 查询请假详细
export function leaveGet(postId) {
  return request({
    url: '/system/leave/' + postId,
    method: 'get'
  })
}

// 新增请假
export function leaveAdd(data) {
  return request({
    url: '/system/leave',
    method: 'post',
    data: data
  })
}

// 修改请假
export function leavePut(data) {
  return request({
    url: '/system/leave',
    method: 'put',
    data: data
  })
}

// 删除请假
export function leaveDel(postId) {
  return request({
    url: '/system/leave/' + postId,
    method: 'delete'
  })
}



// 查询补卡列表
export function cardReplacementList(query) {
  return request({
    url: '/system/sign_repair/list',
    method: 'get',
    params: query
  })
}

// 查询补卡详细
export function cardReplacementGet(postId) {
  return request({
    url: '/system/sign_repair/' + postId,
    method: 'get'
  })
}

// 新增补卡
export function cardReplacementAdd(data) {
  return request({
    url: '/system/sign_repair',
    method: 'post',
    data: data
  })
}

// 修改补卡
export function cardReplacementPut(data) {
  return request({
    url: '/system/sign_repair',
    method: 'put',
    data: data
  })
}

// 删除补卡
export function cardReplacementDel(postId) {
  return request({
    url: '/system/sign_repair/' + postId,
    method: 'delete'
  })
}



// 查询加班列表
export function overtimeList(query) {
  return request({
    url: '/system/overtime/list',
    method: 'get',
    params: query
  })
}

// 查询加班详细
export function overtimeGet(postId) {
  return request({
    url: '/system/overtime/' + postId,
    method: 'get'
  })
}

// 新增加班
export function overtimeAdd(data) {
  return request({
    url: '/system/overtime',
    method: 'post',
    data: data
  })
}

// 修改加班
export function overtimePut(data) {
  return request({
    url: '/system/overtime',
    method: 'put',
    data: data
  })
}

// 删除加班
export function overtimeDel(postId) {
  return request({
    url: '/system/overtime/' + postId,
    method: 'delete'
  })
}

// 查询特定某天是否异常班次进行补卡
export function signlistDay(query) {
  return request({
    url: '/system/sign/list',
    method: 'get',
    params: query
  })
}

// 查询特定某天是否异常班次进行补卡
export function signlistUserDay(query) {
  return request({
    url: '/system/sign_absent/list/user',
    method: 'get',
    params: query
  })
}
